﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Bouyei.DbFactory.DbSqlProvider.SqlKeywords
{
    public class Insert : WordsBase
    {
        public string TableName { get; private set; }

        public Insert(string tableName)
            : base(AttributeType.IgnoreWrite|AttributeType.Ignore)
        {
            this.TableName = tableName;
        }

        public override string ToString()
        {
            return string.Format("Insert Into {0} ", TableName);
        }
    }

    public class Insert<T> : WordsBase
    {
        public string TableName { get; private set; }

        public Insert() 
            : base(typeof(T), AttributeType.IgnoreWrite | AttributeType.Ignore)
        {
            this.TableName = GetTableName();
        }

        public override string ToString()
        {
           // var ColumnNames = GetColumns();
            return string.Format("Insert Into {0} ", TableName);
        }
    }
}
